﻿using UnityEngine;

namespace MyResKit
{
    public class ResourcesRes : Res
    {
        public ResourcesRes(string assetName) : base(assetName)
        {
        }

        public override void Load()
        {
            var loadName = Name.Substring("resources://".Length);
            mAsset = Resources.Load(loadName);
        }

        protected override void Unload()
        {
            Resources.UnloadAsset(mAsset);
        }
    }
}